<!DOCTYPE html>
<html
  xmlns:th="https://www.thymeleaf.org"
  th:replace="~{fragments/layout :: html(title=${post.spec.title}, content = ~{::content}, header = ~{fragments/header::content}, navbar = ~{}, ajaxscrolljs = ~{})}"
>
  <th:block th:fragment="content">
    <div class="nei_top"></div>
    <section class="post-loop">
      <div class="container">
        <div class="post-box">
          <div class="post_list post_head_title">
            <div class="post_beici" th:data-text="${post.spec?.title}"></div>
            <h1 th:text="${post.spec?.title}"></h1>
            <div class="post_loop_info">
              <span class="author" itemprop="author" itemscope th:each="contributor : ${post?.contributors}">
                <a th:text="${contributor?.displayName}"></a>
              </span>
              <span th:text="${#temporals.format(post.spec?.publishTime, 'yyyy-MM-dd')}"></span>
            </div>
          </div>
          <article th:utext="${post.content?.content}">
          </article>
          <div class="post_tag">
            <div class="mt-4">
              <th:block th:each="tag : ${post.tags}">
              <a th:href="@{${tag.status?.permalink}}" th:text="${tag.spec?.displayName}"></a>
              </th:block>
            </div>
          </div>
          <div class="post-next-prev row" th:with="postCursor = ${postFinder.cursor(post.metadata.name)}">
            <div class="post-prev" th:if="${postCursor.hasPrevious()}">
              <div class="next_prev_beici">PREV</div><a th:href="@{${postCursor.previous.status.permalink}}" th:text="${postCursor.previous.spec.title}"></a>
            </div>
            <div class="post-next" th:if="${postCursor.hasNext()}">
              <div class="next_prev_beici">NEXT</div><a th:href="@{${postCursor.next.status.permalink}}" th:text="${postCursor.next.spec.title}"></a>
            </div>
          </div>
          <div class="post-comment">
            <halo:comment
              group="content.halo.run"
              kind="Post"
              th:name="${post.metadata?.name}"
            />
          </div>
        </div>
      </div>
    </section>
  </th:block>
</html>
